package com.cn.shiro_jwt_redis.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration  //这个类是一个配置类  <spring.xml>
@MapperScan("com.cn.shiro_jwt_redis.mapper")
public class MybatisPlusConfigurer {
    //  注入一个bean对象
    //<bean  name="aaa" class="....PaginationInterceptor"></bean>
    @Bean //让分页拦截器被spring管理
    public PaginationInterceptor getPaginationInterceptor(){//  PaginationInterceptor 没有被spring管理
            return    new PaginationInterceptor();
    }
}
